<%@ page language="java" contentType="text/html;charset=UTF-8"%>
<%@ include file="/commons/taglibs.jsp"%>
<%@ include file="/commons/messages.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script language="JavaScript" type="text/javascript" src="${ctx}/scripts/public.js"></script>
<script language="JavaScript" type="text/javascript" src="${ctx}/scripts/public3.js"></script>
<script language="JavaScript" type="text/javascript" src="${ctx}/scripts/show.js"></script>
<script language="JavaScript" type="text/javascript" src="${ctx}/scripts/global.js"></script>
<script language="JavaScript" type="text/javascript" src="${ctx}/scripts/rightmenu2.js"></script>
<script language="JavaScript" type="text/javascript" src="${ctx}/scripts/extremetable/extremecomponents.js"></script>
<script type="text/javascript" src="${ctx}/scripts/div/window.js"></script>
<link rel="stylesheet" type="text/css" href="${ctx}/scripts/div/css/window.css" />
<link href="${ctx}/styles/grid.css" rel="stylesheet" type="text/css">
<link href="${ctx}/styles/listTable.css" rel="stylesheet" type="text/css">
<link href="${ctx}/styles/show.css" rel="stylesheet" type="text/css" />
<link href="${ctx}/styles/public.css" rel="stylesheet" type="text/css">
<link href="${ctx}/styles/aux_window.css" rel="stylesheet" type="text/css">
<script type="text/javascript">

    function resize(){
		parent.window.document.all("customerBaseIframe").style.height=document.body.scrollHeight;

	}
	function setVar(customerType,customeID){
		parent.setVar(customerType,customeID);
	}

    /*
	Judgement is personal or business owners,
	open a new window, show that the owners details.
    */
	function openOwnerDetail(index,participantTypeCode){
		var url = null;
		var cacheIndex = null;
		if(isNaN(index)){
			alert("无效的记录！");
			return;
		}

		if('001' == participantTypeCode){//owner
			url = "${ctx}/customer_ownerAction.do?method=getIndividualDetailCacheByIndex&index=" + index;
			windowOpen(url,"ownerIndividualDetail","业主详细资料",610,900,true,"ownerIndividualDetail");
		}else if('002' == participantTypeCode){
			url = "${ctx}/customer_ownerAction.do?method=getOrganizationDetailCacheByIndex&index=" + index;
			windowOpen(url,"ownerOrganizationDetail","业主详细资料",610,900,true,"ownerOrganizationDetail");
		}else{
			alert("请选择一条记录！");
		}
	}
</script>
</head>
<body onload="resize();">
	<ec:ceTable items="ownerBaseList" autoIncludeParameters="true"
			var="customerItem"
			action="${ctx}/customer_ownerAction.do?method=findOwnerBaseListCachePage"
			rowsDisplayed="3"
			width="100%"
			view="pmsview"
			styleClass="gridData"
			>
		<ec:ceRow styleClass="grid" ondblclick="openOwnerDetail('${customerItem.index}','${customerItem.participantTypeCode}');" onclick="setVar('${customerItem.participantTypeCode}','${customerItem.index}');" onContextMenu="return ShowContextMenu(event,'quick_rightmenu3')">
			<ec:ceColumn property="participantName" headerCell="pmsHeadrCell" width="9%" title="姓名"></ec:ceColumn>
			<ec:ceColumn property="customerType" headerCell="pmsHeadrCell"  width="8%"  title="住户类型"></ec:ceColumn>
			<ec:ceColumn property="certificateTypeName" headerCell="pmsHeadrCell"   width="9%" title="证件类型"></ec:ceColumn>
			<ec:ceColumn property="certificateNo" headerCell="pmsHeadrCell"   width="8%" title="证件号码"></ec:ceColumn>
			<ec:ceColumn property="telephone" headerCell="pmsHeadrCell"   width="9%" title="联系电话"></ec:ceColumn>
		</ec:ceRow>
	</ec:ceTable>

		  <!----  业主基本资料右键 开始---->
	<div id="quick_rightmenu3" style="display:none;" oncontextmenu="return false" class="quick_rightmenu">
         <table width="100%" border="0" cellpadding="1" cellspacing="0" class="grid_quickMenu_bg" onMouseOver="MM_showHideLayers('qquick_menu','','show')" onMouseOut="MM_showHideLayers('quick_menu','','hidden')">
           <tr>
             <td><table width="100%" border="0" cellpadding="2" cellspacing="0">
                 <tr>
                   <td class="quickMenu_toolbarico"><a href="#"  onclick="parent.openOwnerAdd();"onfocus="this.blur()"><img src="${ctx}/images/ico_newfile.gif" alt="" width="16" height="16" border="0" align="absbottom"> 新 建</a></td>
                 </tr>
                 <tr>
                   <td class="quickMenu_toolbarico"><a href="#" onFocus="this.blur()" onClick="parent.openOwnerEdit();"><img src="${ctx}/images/ico_amend.gif" alt="" width="16" height="16" border="0" align="absbottom"> 修 改</a></td>
                 </tr>
                 <tr>
                   <td class="quickMenu_toolbarico"><a href="#" onClick="parent.openDelete();" onFocus="this.blur()"><img src="${ctx}/images/ico_delete.gif" alt="" width="16" height="16" border="0" align="absbottom"> 删
                     除</a></td>
                 </tr>
             </table></td>
           </tr>
         </table>
      </div>
	   <!----  业主基本资料右键 结束---->
</body>
</html>
